const addZero = (num) => num.toString().padStart(2, '0')

const getNewDate = () => {
	const date = new Date()
	const YYYY = date.getFullYear()
	const MM = date.getMonth() + 1
	const DD = date.getDate()
	const hh = date.getHours()
	const mm = date.getMinutes()
	const ss = date.getSeconds()
	return `${YYYY}-${addZero(MM)}-${addZero(DD)} ${addZero(hh)}:${addZero(mm)}:${addZero(ss)}`
}

module.exports.addZero = addZero
module.exports.getNewDate = getNewDate